home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_09_08 / 9n08040a < prev    next >
Text File  |  1991-04-22  |  2KB  |  89 lines

  1. /* bios.h 1990 Dave Newman  IBM Bios package */
  2. #ifndef bios_h
  3. #define bios_h
  4.  
  5. /* see note at bottom for need of use */
  6. void bios_open(void);
  7.  
  8. /* currently just returns (does nothing) */
  9. void bios_close(void);
  10.  
  11. /* get video mode (value same as cur_mode) 
  12.    if bios_open() was called */
  13. int bios_mode(void);
  14.  
  15. /* scroll active page down */
  16. void bios_scroll_dn(int,int,int,int,int);
  17.  
  18. /* scroll active page up */
  19. void bios_scroll_up(int,int,int,int,int);
  20.  
  21. /* set cursor type */
  22. void bios_cursor(int);
  23.  
  24. /* move cursor to row/col */
  25. void bios_move(int,int);
  26.  
  27. /* return current cursor location */
  28. void bios_rc(void);
  29.  
  30. /* put char at cursor */
  31. void bios_putchar(char);
  32.  
  33. /* put char with attribute */
  34. void bios_pchatt(char);
  35.  
  36. /* put string at cursor */
  37. void bios_puts(char *);
  38.  
  39. /* read char at cursor */
  40. char  bios_rdchar(void);
  41.  
  42. /* read char and attribute at cursor */
  43. int  bios_rdchatt(void);
  44.  
  45. /* adapter types */
  46. extern char
  47.     cga,        /* color graphics adapter */
  48.    ega,         /* Enhanced graphics adapter */
  49.    vga,         /* video graphics array */
  50.    mcga,        /* PS/2 mcga display */
  51.    mono,        /* just black and white */
  52.    herc,        /* hercules graphics adapter */
  53.    none;        /* no monitor at all (or unknown) */
  54.  
  55. extern char     /* these are set even if none == 1 */
  56.    color,       /* is is using a color monitor */
  57.    b_w;         /* or black+white? */
  58.  
  59. /* these vars hold information about the system.
  60.    They are valid after the call to bios_open().
  61.    If the information in them is not relevant,
  62.    the call to bios_open() is not necessary. */
  63. extern int cur_mode;
  64. extern int cur_page;
  65. extern int num_cols;
  66.  
  67. /* these vars hold info about the cursor position
  68.    and the current color/attribute being used.
  69.    (no bios_open call necessary) */
  70.  
  71. /* display attribute */
  72. extern unsigned char cur_attr;
  73.  
  74. /* current row of cursor */
  75. extern int cur_row;
  76.  
  77. /* current column of cursor */
  78. extern int cur_col;
  79.  
  80. /* clear text mode 80x25 screen */
  81. #define cls() 
  82.   bios_scroll_dn(25,0,0,24,79);bios_move(0,0)
  83.  
  84. #endif
  85. /* end bios.h */
  86.  
  87.  
  88.  
  89.